package com.zz.jdk8;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * @author zhr
 */
public class Tj2 {
    public static void main(String[] args) {
        Tj2 t = new Tj2();
        MathOperation op = (a, b) -> a + b;
        System.out.println(t.operate(1,2, op));

    }
    private int operate(int a, int b, MathOperation op) {
        return op.operation(a, b);
    }

    interface MathOperation{
        int operation(int a, int b);
    }
}
